package com.alibaba.aone.casestudy.common.entity;

import java.io.Serializable;

import com.alibaba.aone.casestudy.common.utils.TimeUtil;
import java.sql.Timestamp;
import java.util.Date;

import org.jboss.remoting.util.TimerUtil;

public class FailureTime implements Serializable{
	private Integer id;
	private Integer rank;
	private Date gmtStart;
	private Date gmtEnd;
	private long  gmtContinued;
	private String failureNumber;
	private Date gmtCreate;
	private Date gmtModified;
	
	
	//用于时间转化的
	private String startToString;
	
	private String endToString;
	
	private long continueTime;
	
	

	public String getContinueTime() {
		long hour = 0;
		if((null!=gmtEnd)&&(null!=gmtStart)){
		//Long day = gmtEnd.getTime()/1000/60/60/24-gmtStart.getTime()/1000/60/60/24;
		 hour = gmtEnd.getTime()/1000/60/60-gmtStart.getTime()/1000/60/60;
		//long minute = gmtEnd.getTime()/1000/60-gmtStart.getTime()/1000/60;
		}
		return hour+"/时";
	}
	public String getEndToString() {
		String timeToString = null;
		if(null!=gmtEnd){
			 timeToString = TimeUtil.TimeToString(gmtEnd);
		}
		return timeToString;
	}
	public String getStartToString() {
		String timeToString = null;
		if(null!=gmtStart){
			 timeToString = TimeUtil.TimeToString(gmtStart);
		}
		return timeToString;
	}
	
	
	public long getGmtContinued() {
		return gmtContinued;
	}
	public void setGmtContinued(long gmtContinued) {
		this.gmtContinued = gmtContinued;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getRank() {
		return rank;
	}
	public void setRank(Integer rank) {
		this.rank = rank;
	}
	
	public Date getGmtStart() {

		return gmtStart;
	}
	public void setGmtStart(Date gmtStart) {
		this.gmtStart = gmtStart;
	}
	public Date getGmtEnd() {
		return gmtEnd;
	}
	public void setGmtEnd(Date gmtEnd) {
		this.gmtEnd = gmtEnd;
	}
	public String getFailureNumber() {
		return failureNumber;
	}
	public void setFailureNumber(String failureNumber) {
		this.failureNumber = failureNumber;
	}
	public Date getGmtCreate() {
		return gmtCreate;
	}
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	public Date getGmtModified() {
		return gmtModified;
	}
	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	
	
}
